import json
res=open('/monitor/LightCam/pyweb/static/json/ipsla/ipsla.json','r').read()
res=json.loads(res)
res['rows']=sorted(res['rows'],key=lambda d:[d['Source'],d['Target'][0],int(d['Target'].replace('front','').replace('mdkernel',''))],reverse=False)
f=open('/monitor/LightCam/pyweb/static/json/ipsla/ipsla.json','w')
f.write(json.dumps(res))
